<?php
class Ab_Path extends Ab_Model{
	private $path;
	private $pathType=null;
	private $errors=array();
	private $rootDir=null;
	
	function __construct($path){
		$this->path=$path;
	}
	
	public function setRootDir($rootDir){
		$this->rootDir=$rootDir;
	}
	
	public function getRootDir(){
		return $this->rootDir;
	}
	
	public function getRelativePath(){
		return substr($this->path,strlen($this->rootDir));
	}
	
	public function getPath(){
		return $this->path;
	}
	
	public function getPathType(){
		$pathFactory=new Ab_PathFactory($this->path);		
		$this->pathType=$pathFactory->getPathType();
		return $this->pathType;
	}
	
	public function getType(){
		return 'path';
	}
	
	public function getErrors(){
		return $this->errors;
	}
	
	
}
?>
